import HibTeX.Parser
import HibTeX.PrettyPrinter
import System

main = 	do
                args <- getArgs
                str <- readFile $args!!0
                case (hibTeXParse  (args !! 0) str)  of
                        (Right s) ->  prettyPrint $ s
                        (Left v) -> putStr $ show v
